{*
 * IMMOPHP
 * @author Drouche Romain
 * @contact contact@immophp.fr
 * @website www.immophp.fr
 * 
*}
<script type="text/javascript">
<!--
	function delbloc(id)
	{
	   if (confirm('{$lang.Confirm_suppression_bloc} ?'))
	   {
	       document.location.href = 'bloc.php?delete&token={$token}&bloc_id='+id;
       }
	}
// -->
</script>
<h3>{$lang.Gestion_des_blocs}</h3>
<br /><br />

{if $error_msg == true}
<span id="errorh"></span>
<div id="error_msg">
	<div class="{$error_class}" style="width:500px;margin:auto;padding:15px;">
		<img src="{$url_site}images/{$error_image}.png" alt="" style="float:left;padding-right:6px;" /> {$error_message}
	</div>
	<br />
</div>
<script type="text/javascript">
<!--
	//Javascript timeout to hide this message
	setTimeout('Effect.Fade("error_msg");', 3000);
-->
</script>
<br /><br />
{/if}

<table style="width:98%; margin:auto;">
    <tr>
        <td class="thead"><strong>#</strong></td>
        <td class="thead"><strong>{$lang.Nom}</strong></td>
        <td class="thead"><strong>{$lang.Ordre}</strong></td>
        <td class="thead"><strong>{$lang.Emplacement}</strong></td>
        <td class="thead"><strong>{$lang.Plugins}</strong></td>
        <td class="thead"><strong>{$lang.Action}</td>
    </tr>

    {section name=idb loop=$blocs}
    <tr>
        <td class="tcontenue">{$blocs[idb].id}</strong></td>
        <td class="tcontenue">{$blocs[idb].name}</td>
        <td class="tcontenue">{$blocs[idb].ordre}</td>
        <td class="tcontenue">{$blocs[idb].emplacement}</td>
        <td class="tcontenue">{$blocs[idb].plugins}</td>
        <td class="tcontenue">{$blocs[idb].action}</td>
    </tr>
    {/section}
    
</table>
<br />
<br />
<h3>{$lang.Bloc_disponible}</h3>
<br />
<br />
<table style="width:98%; margin:auto;">
    <tr>
        <td class="thead"><strong>{$lang.Nom}</strong></td>
        <td class="thead"><strong>{$lang.Description}</strong></td>
        <td class="thead"><strong>{$lang.Plugins}</strong></td>
        <td class="thead"><strong>{$lang.Action}</td>
    </tr>

    {section name=idb2 loop=$blocs_disponible}
    <tr>
        <td class="tcontenue">{$blocs_disponible[idb2].nom}</td>
        <td class="tcontenue">{$blocs_disponible[idb2].description}</td>
        <td class="tcontenue">{$blocs_disponible[idb2].plugins}</td>
        <td class="tcontenue">{$blocs_disponible[idb2].action}</td>
    </tr>
    {/section}

</table>
<br />
<br />
<fieldset style="margin:auto; width:95%;">
    <legend>{$lang.Bloc_html}</legend>
    <br /><br />
    <form method="post" action="bloc.php">
    <table>
        <tr>
            <td class="tcontenue"><label>{$lang.Titre} :</label></td>
            <td class="tcontenue"><input type="text" name="titre" /></td>
        </tr>
        <tr>
            <td class="tcontenue"><label>{$lang.Emplacement} :</label></td>
            <td class="tcontenue">
                <select name="emplacement">
                    <option value="1">{$lang.Haut_gauche}</option>
                    <option value="2">{$lang.Haut_droite}</option>
                    <option value="3">{$lang.Haut_centre}</option>
                    <option value="4">{$lang.Gauche}</option>
                    <option value="5">{$lang.Droite}</option>
                    <option value="6">{$lang.Bas_gauche}</option>
                    <option value="7">{$lang.Bas_droite}</option>
                    <option value="8">{$lang.Bas_centre}</option>
                </select>
            </td>
        </tr>
        <tr>
            <td class="tcontenue"><label>{$lang.Ordre} :</label></td>
            <td class="tcontenue"><input type="text" name="ordre" /></td>
        </tr>
        <tr>
            <td class="tcontenue"><label>{$lang.Contenu} :</label></td>
            <td class="tcontenue">{$champ_contenu}</td>
        </tr>
        <tr>
            <td colspan="2" style="text-align:center;">
                <input type="hidden" name="token" value="{$token}" />
                <input type="submit" name="add_html" value="{$lang.Enregistrer}" />
            </td>
        </tr>  
    </table>
    </form>
</fieldset>